package cn.grab.fispservice.config;

import cn.grab.fispservice.authentication.Interceptor.AuthenticationInterceptor;
import com.fontana.sb.config.DefaultWebMvcConfig;
import javax.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

/**
 * @className: MyWebMvcConfig
 * @Description: 继承默认配置
 * @version: v1.0.0
 * @author: cqf
 * @date: 2021/12/29 13:44
 */
@Configuration
public class MyWebMvcConfig extends DefaultWebMvcConfig {

  @Resource
  private AuthenticationInterceptor authenticationInterceptor;

  @Override
  public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(authenticationInterceptor).addPathPatterns("/authentication/**");
  }
}


